import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useUserStore = defineStore('userstore', () => {
  const token = ref('')
  const user = ref({})
  const menus=ref([])
  const perms=ref([])
  const roles=ref([])

  return { token, user, menus, perms ,roles }
},{
  persist: {
    enabled: true // true 表示开启持久化保存
  }
})
